import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  // 当前登录用户信息
  queryCurrent: (query) => api.post(`${config.interfaces.type5}portfolio-server/authentication/getUser`, query),
  //
  updatePassWord: (query) => api.post(`${config.interfaces.type2}usermanagement/user/updatePassWord`, query),
  //
  verifyPassWord: (query) => api.post(`${config.interfaces.type2}usermanagement/user/verifyPassWord`, query),
  //
  getMenu: (query) => api.get(`${config.interfaces.type5}portfolio-server/authentication/getMenu`, query),
  // 登录接口
  urlLogin: (query) => api.post(`${config.interfaces.type2}usermanagement/authentication/user`, query),
  // heimdall 获取验证码
  getVerificationCode: (query) => api.post(`${config.interfaces.type8}VerificationCodeService/sendToValidUser`, query),
  // heimdall登录接口
  heimdallLogin: (query) => api.post(`${config.interfaces.type9}login/multifactors`, query),
  // heimdall 退出登录
  heimdallLogout: (query) => api.post(`${config.interfaces.type9}logout`, query),
  // 注册极验接口
  registerGeetest: (query) => api.post(`${config.interfaces.type8}GeetestDubboService/register`, query),
  // 二次校验 极验接口
  validateGeetest: (query) => api.post(`${config.interfaces.type8}GeetestDubboService/enhencedValidate`, query),
  // 极验接口 二次校验 备用接口 离线可用
  failbackValidate: (query) => api.post(`${config.interfaces.type8}GeetestDubboService/failbackValidate`, query),
  // 重置密码
  resetPassword: (query) => api.post(`${config.interfaces.type8}updateOriginPassword`, query),
  // 获取登出 系统code 判断登出之后跳转的地址
  getSystemCode: (query) => api.get(`${config.interfaces.type5}portfolio-server/authentication/getLoginSystemCode`, query),
};
